<admintpl file="header" />
<body class="J_scroll_fixed">
     <link href="/statics/simpleboot/css/jquery-ui.css" rel="stylesheet" />
    <script src="/statics/js/jquery-ui.js"></script>
	<div class="wrap J_check_wrap">
		<ul class="nav nav-tabs">
	        <li class="active"><a href="#A" data-toggle="tab">基本属性</a></li>
	        <li><a href="#B" data-toggle="tab">SEO设置</a></li>
	        <!-- <li><a href="#C" data-toggle="tab">模板设置</a></li> -->
	    </ul>
		<form class="form-horizontal J_ajaxForm" name="myform" id="myform" action="{:u('AdminTerm/add_post')}" method="post">
			<div class="tabbable">
		        <div class="tab-content">
		          <div class="tab-pane active" id="A">
		          		<table cellpadding="2" cellspacing="2" width="100%">
							<tbody>
								<tr>
									<td width="140">上级:</td>
									<td><select name="parent" class="normal_select">
											<option value="0">作为一级分类</option>
											{$terms_tree}
									</select></td>
								</tr>
								<tr>
									<td>名称:</td>
									<td><input type="text" class="input" name="name" value=""><span class="must_red">*</span></td>
								</tr>
								<tr>
									<td>描述:</td>
									<td><textarea name="description" rows="5" cols="57"></textarea></td>
								</tr>
								<tr>
									<td>类型:</td>
									<td><select name="taxonomy">
											<foreach name="taxonomys" item="vo">
									        	<option value="{$key}">{$vo}</option>
											</foreach>
									</select></td>
								</tr>
								 <tr>
									<td>缩略图</td>
									<td>
										<div><input type='hidden' name='slide_pic' id='thumb' value=''>
										<a href='javascript:void(0);' onclick="flashupload('thumb_images', '附件上传','thumb',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','content','12','b6ba209759e147124653ac77362ef2bd');return false;">
										<img src='__ROOT__/statics/images/icon/upload-pic.png' id='thumb_preview' width='135' height='113' style='cursor:hand' /></a>
										<input type="button"  class="btn" onclick="$('#thumb_preview').attr('src','__ROOT__/statics/images/icon/upload-pic.png');$('#thumb').val('');return false;" value="取消图片">
										</div>
									</td>
								</tr>
                                                                
                                                                <tr>
									<td>关联医生:</td>
									<td> <input id="tags"></td>
								</tr>
                                                                
                                                                  <tr>
                                                                      <td colspan="2">
                                                                          
                                                                          <style>
                                                                              .labelUL{
                                                                                  
                                                                                 
                                                                              }                                            	
             .wrapper-border {
		vertical-align: top;
		letter-spacing: normal;
		word-spacing: normal;
		padding: 14px;
		position: relative;
		z-index: 1;
                list-style: none;
                float: left;
                display: inline;
	}
	.text{
		background-color: #FFF;
		text-align: center;
		border: solid 1px #F5F5F5;
	}
	.text:hover{
		border-color: #27A9E3;
	}
	.text i{
		padding: 20px;
                line-height: 40px;
                font-size: 14px;
	}
	
	.text a.del {
		font-family: Tahoma;
		font-size: 10px;
		line-height: 14px;
		color: #CCC;
		background-color: #FFF;
		vertical-align: middle;
		text-align: center;
		display: none;
		width: 14px;
		height: 14px;
		border: solid 1px;
		border-radius: 8px;
		position: absolute;
		z-index: 2;
		top: 8px;
		right: 8px;
                text-decoration: none;
	}

	.text:hover a.del {
		color: #27A9E3;
		border-color: #27A9E3;
		display: block;
	}
	.text:hover a.del:hover {
		text-decoration: none;
	}
                                                                          </style>
                                                                    
                                                                      
                                                                          <ul class="labelUL" id="tag_list">
                                                                 </ul>
                                                                      
                                                                      </td>
                                                      
								</tr>
							</tbody>
						</table>
		          </div>
		          <div class="tab-pane" id="B">
		          		<table cellpadding="2" cellspacing="2" width="100%">
							<tbody>
								<tr>
									<td width="180">SEO标题:</td>
									<td><input type="text" class="input" name="seo_title" value=""></td>
								</tr>
								<tr>
									<td>SEO关键字:</td>
									<td><input type="text" class="input" name="seo_keywords" value=""></td>
								</tr>
								<tr>
									<td>SEO描述:</td>
									<td><textarea name="seo_description" rows="5" cols="57"></textarea></td>
								</tr>
							</tbody>
						</table>
		          </div>
		         <!--  <div class="tab-pane" id="C">
		          		<table cellpadding="2" cellspacing="2" width="100%">
							<tbody>
								<php>$tpl_list=sp_admin_get_tpl_file_list();</php>
								<tr>
									<td width="180">列表页模板:</td>
									<td>
										<php>
											$list_tpls=$tpl_list;
											unset($list_tpls['list']);
										</php>
					              		<select  class="normal_select" name="list_tpl">
					              			<option value="list">list{:C("TMPL_TEMPLATE_SUFFIX")}</option>
					              			<foreach name="list_tpls" item="vo">
					              				<option value="{$vo}">{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>
					              			</foreach>
					              		</select>
									</td>
								</tr>
								<tr>
									<td>单文章模板:</td>
									<td>
										<php>
											$article_tpls=$tpl_list;
											unset($article_tpls['article']);
										</php>
					              		<select  class="normal_select" name="one_tpl">
					              			<option value="article">article{:C("TMPL_TEMPLATE_SUFFIX")}</option>
					              			<foreach name="article_tpls" item="vo">
					              				<option value="{$vo}">{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>
					              			</foreach>
					              		</select>
									</td>
								</tr>
							</tbody>
						</table>
		          </div> -->
		        </div>
		    </div>
		     <div class="form-actions">
		           <button class="btn btn-primary btn_submit J_ajax_submit_btn"type="submit">提交</button>
		      		<a class="btn" href="{:U('AdminTerm/index')}">返回</a>
		      </div>
		</form>
	</div>
	<script type="text/javascript" src="__ROOT__/statics/js/common.js"></script>
	<script type="text/javascript" src="__ROOT__/statics/js/content_addtop.js"></script>
        <script>
  $(function() {
      
      
              function log( message ) {
      $( "<li class='wrapper-border'>" ).html( message ).prependTo( "#tag_list" );
      $( "#log" ).scrollTop( 0 );
    }

   $( "#tags" ).autocomplete({
        
     source: '{:U('AdminTerm/doc_show')}',
      minLength: 1,
      select: function( event, ui ) {     
          log('<div class="text"><input type="hidden" name="h_name['+ui.item.id+']" value="'+ui.item.value+'"><i>'+ui.item.value+'</i><a href="javascript:void(0)" nctype="del" class="del" title="移除">X</a></div>')
          $('.del').bind("click",function(){
          $(this).closest("li").remove();
    });
//log( ui.item ?
        //  "Selected: " + ui.item.value + " aka " + ui.item.id :
        //  "Nothing selected, input was " + this.value );
      },
       close: function() { 
           $( "#tags" ).val("");
       }
      
    });

  });
  </script>
</body>
</html>